package com.tofix.kidmall.service;

import com.tofix.kidmall.common.CommonPage;
import com.tofix.kidmall.common.CommonResult;
import com.tofix.kidmall.entity.Cart;
import com.tofix.kidmall.exception.ApiExcetion;

import java.util.List;
import java.util.Optional;

public interface CartService {
    Cart getCart(String id);

    Cart addCart(Cart cart);

    Integer deleteCart(String id);

    Cart saveCart(Cart cart);

    CommonPage<Cart> getAllByPage(Integer currentPage, Integer pageSize);

    CommonResult<List<Cart>> getAll();
}
